package main

import (
	"log"

	"gitee.com/z1gotool/z1tryout"
)

func main() {
	// https://gitee.com/myzero1/tryout/raw/master/test/BFEBFBFF000906EA
	if true {
		z1tryout.ShowDeviceID()
	}

	if true {
		log.Println("----------test split line-----------")
		z1tryout.SetTryout(`https://gitee.com/myzero1/tryout/raw/master/test/`)
		log.Println(`------z1tryout.TryoutExpired()--- online ----`, z1tryout.TryoutExpired())
	}

	if true {
		log.Println("----------test split line,with end time-----------")
		z1tryout.SetTryout(`https://gitee.com/myzero1/tryout/raw/master/test/`, `2022-01-02 15:04:05`)
		log.Println(`------z1tryout.TryoutExpired()--- online ----`, z1tryout.TryoutExpired())
	}

	if true {
		log.Println("----------test split line,with end time and deviceId-----------")
		z1tryout.SetTryout(`https://gitee.com/myzero1/tryout/raw/master/test/`, `2022-01-02 15:04:05`, `db098a8e3d8b1829d033f1dedf770e3a`)
		log.Println(`------z1tryout.TryoutExpired()--- online ----`, z1tryout.TryoutExpired())
	}
	if true {
		log.Println("----------test split line,local,only one deviceId-----------")
		z1tryout.SetTryout(``, ``, ``, `db098a8e3d8b1829d033f1dedf770e3a`)
		log.Println(`------z1tryout.TryoutExpired()--- local for db098a8e3d8b1829d033f1dedf770e3a ok ----`, z1tryout.TryoutExpired())
	}
	if true {
		log.Println("----------test split line,local,for all deviceIde-----------")
		z1tryout.SetTryout(``, ``, `db098a8e3d8b1829d033f1dedf770e3a`, `db098a8e3d8b1829d033f1dedf770e3a`)
		log.Println(`------z1tryout.TryoutExpired()--- local for all ok----`, z1tryout.TryoutExpired())
	}
}
